GtkWidget *child)
{
notebook->remove_in_detach = TRUE;
- gtk_container_remove (GTK_CONTAINER (notebook), child);
+ gtk_notebook_remove (notebook, child);
notebook->remove_in_detach = FALSE;
}
GtkWidget *menu_item = gtk_widget_get_parent (page->menu_label);
gtk_container_remove (GTK_CONTAINER (menu_item), page->menu_label);
- gtk_container_remove (GTK_CONTAINER (notebook->menu), menu_item);
+ gtk_widget_unparent (menu_item);
gtk_notebook_menu_item_create (notebook, page);
}
list = g_list_last (notebook->children);
if (list)
- gtk_container_remove (GTK_CONTAINER (notebook),
- ((GtkNotebookPage *) list->data)->child);
+ gtk_notebook_remove (notebook, ((GtkNotebookPage *) list->data)->child);
}
/* Public GtkNotebook Page Switch Methods :
if (page->menu_label)
{
if (notebook->menu)
- gtk_container_remove (GTK_CONTAINER (notebook->menu),
- gtk_widget_get_parent (page->menu_label));
+ gtk_widget_destroy (gtk_widget_get_parent (page->menu_label));
g_clear_object (&page->menu_label);
}
static void
show_all_pages (GtkButton *button,
GtkNotebook *notebook)
-{
- gtk_container_foreach (GTK_CONTAINER (notebook),
- (GtkCallback) gtk_widget_show, NULL);
+{
+ int i;
+
+ for (i = 0; i < gtk_notebook_get_n_pages (notebook); i++)
+ gtk_widget_show (gtk_notebook_get_nth_page (notebook, i));
}
static void